<?php

include_once APPLICATION_DIR . "/application/model/MAIL_NOTIFY.php";

class Mail_Notify extends DataObjects_MAIL_NOTIFY
{
	public static function insertLog($bID,$status,$reason = ""){
		$notify = new Mail_Notify();
		$notify->ID_BOOKING = $bID;
		$notify->IND = 0;
		$notify->find();
		if($notify->N > 0){
			return false;
		}
		$notify = new Mail_Notify();
		$notify->ID_BOOKING = $bID;
		$notify->STATUS = $status;
		$notify->REASON = $reason;
		$notify->insert();
		return true;
	}
}
?>
